<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:text="${title}">标题</title>
    <meta charset="UTF-8">
</head>
<body>
<strong th:text="${title}">标题</strong>
<form th:action="@{/th/userList}" th:object="${user}" method="post">
    <input type="hidden" name="pageNumber" th:value="${page.number}">
    用户名：<input type="text" name="username" th:value="*{username}">
    <br/>
    密码：<input type="text" name="password" th:value="*{password}">
    <br/>
    电话：<input type="text" name="phone" th:value="*{phone}">
    <br/>
    邮箱：<input type="text" name="email" th:value="*{email}">
    <br/>
    <button type="submit">提交</button>
    <button type="reset">重置</button>
</form>
<table>
    <thead>
    <tr>
        <th class="am-hide-sm-only">id</th>
        <th>用户名</th>
        <th>密码</th>
        <th class="am-hide-sm-only">电话</th>
        <th class="am-hide-sm-only">邮箱</th>
        <th class="am-hide-sm-only">是否可用</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="user : ${page.content}">
        <td th:text="${user.id}">id</td>
        <td th:text="${user.username}">用户名</td>
        <td th:text="${user.password}">密码</td>
        <td th:text="${user.phone}">电话</td>
        <td th:text="${user.email}">邮箱</td>
        <td th:switch="${user.enabled}">
            <span th:case="true">可用</span><span th:case="false">不可用</span>
        </td>
        <td>
            <button>修改</button>
            <button>删除</button>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>